<?php
use Illuminate\Container\Container;  
use Illuminate\Database\Capsule\Manager as Capsule;
$database=require ROOT_PATH.'/config/database.php';
$capsule = new Capsule;
// 创建链接
$capsule->addConnection($database);
// 设置全局静态可访问
$capsule->setAsGlobal();
// 启动Eloquent
$capsule->bootEloquent();